<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<div class="index-top">
    <div class="index-header">
        <div class="container">
            <div class="index-logo">
            </div>
            <p style="font-size: xx-large">OCR接口识别与应用软件</p>
            <shiro:hasRole name="user">
                <div class="dropdown pull-right index-username">
                    <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
                            data-toggle="dropdown">
                        <shiro:principal
                                property="name"/>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
                        <li role="presentation"><a role="menuitem" tabindex="-1"
                                                   href="${ctx}/profile">修改个人信息</a></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="${ctx}/logout">注销用户</a>
                        </li>
                    </ul>
                </div>
            </shiro:hasRole>
            <shiro:hasRole name="admin">
                <div class="dropdown pull-right index-username">
                    <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu12"
                            data-toggle="dropdown">
                        <shiro:principal
                                property="name"/>
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
                        <%--<li role="presentation"><a role="menuitem" tabindex="-1" href="${ctx}/admin/index">后台管理</a></li>--%>
                        <li role="presentation"><a role="menuitem" tabindex="-1"
                                                   href="${ctx}/profile">修改个人信息</a></li>
                        <li role="presentation"><a role="menuitem" tabindex="-1" href="${ctx}/logout">注销用户</a>
                    </ul>
                </div>
            </shiro:hasRole>
            <div class="index-menu">
                <ul>
                    <li class="first-item index-item"><a href="${ctx}/index">首页</a></li>
                    <li class="index-item"><a href="${ctx}/index/search">文档检索</a></li>
                    <li class="index-item"><a href="${ctx}/para/searchentry">文档段落检索</a></li>
                    <li class="index-item"><a href="${ctx}/doc/list">文档管理</a></li>
                    <shiro:guest>
                        <li class="last-item index-item"><a href="${ctx}/login" class="index-login">登录/注册</a></li>
                    </shiro:guest>
                </ul>
            </div>

        </div>
    </div>
</div>